The next topic is Memorystore, which
is a fully managed Redis or Memcached. Memorystore is a data store resource that
is the equivalent to a managed Redis or Memcached. Both Redis and Memcached are in memory
key value data bases as is Memorystore. Fully managed means provisioning,
replication failover and patching are all automated. Memorystore has a 99.9% availability
SLA would automatic failover. Wire protocol is compatible with
the open source alternatives. Memory store instances are available
in the VPC on an internal IP address. Remember from the last module,
Cloud Run is not part of the VPC. To communicate with an internal IP address
from Cloud Run, you need a VPC connector. Because of how Memorystore
connect to the VPC, the VPC connector needs to be in the same
region as the Memorystore instance. Cloud Run is known for its fast
scaling as I've mentioned previously, it can go from 0 to 1000 containers
in less than 10 seconds. Cloud Run containers open
a connection to the VPC connector. Which is a set of auto scaling connector
instances under the hood that can add instances automatically. Memory store instances can be set to
scale up with a failover if you need more capacity. We've already covered VPC connectors
in a previous module, but we didn't talk about how
they work internally. This is the right moment
to dive a bit deeper. You can think of the VPC connector
like a group of virtual machines, connector instances that fall traffic
from Cloud Run to the VPC network. The VPC connector adds connector
instances if more throughput is required. You can pick the machine type,
larger machines allow for more throughput more than one gigabit
per second, but they cost more. VPC connector never removes connector
instances to avoid breaking connections, it will scale up but not down. Pricing, every connector instance
adds a constant flat fee, the VPC connector is not servers. The default setting of the VPC
connector will work well for all but the largest applications. It's likely you'll never need to customize
the settings of the VPC connector. Only very large customers
that are very heavy users of Memorystore might need to change
the scaling settings of the VPC connector. To summarize, Memorystore is like
a managed Redis or Memcached. A Memorystore instance is available
on a private IP address in your VPC. To connect from Cloud Run, you need to
create a Serverless VPC access connector.